<!DOCTYPE html>
<html>
<head>
    <title>选择规程</title>
    #parse("sys/header.html")

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px"></Row>
        <table id="jqGrid"></table>
    </div>
</div>
<script>
    $(function () {
        $("#jqGrid").Grid({
            url: '../devmaintenplan/listByEnd',
            colModel: [
                {label: '设备编码', name: 'devCode', index: 'DEV_CODE', width: 80,},
                {label: '规程名称', name: 'ruleName', index: 'RULE_NAME', width: 80,},
                {label: '版本', name: 'planVersion', index: 'PLAN_VERSION', width: 80},
                {label: '规程类型', name: 'reserve1', index: 'reserve1', width: 80,
                    formatter:function (value) {
                        if(value==""||value=="null"||value==null){
                            return "";
                        }else{
                            return sysEnums.MAINTENPLAN_TYPE[value];
                        }
                    }},
                {label: '内容', name: 'planCon', index: 'PLAN_CON', width: 80},
                {label: '编制人', name: 'orgUserName', index: 'ORG_USER_NAME', width: 80},
                {label: '车间审核人', name: 'checkUserName', index: 'CHECK_USER_NAME', width: 80},
                {label: '审核状态', name: 'checkStatus', index: 'CHECK_STATUS', width: 80,
                    formatter: function (value) {
                        return sysEnums.CHECK_FLAG[value];
                    }},
                {label: '审核时间', name: 'checkDate', index: 'CHECK_DATE', width: 80,
                    formatter: function (value) {
                        return transDate(value, "yyyy-MM-dd");
                    }},
                {label: 'PE授权人', name: 'okUserName', index: 'OK_USER_NAME', width: 80},
                {label: '批准状态', name: 'okStatus', index: 'OK_STATUS', width: 80,
                    formatter: function (value) {
                        return sysEnums.CHECK_FLAG[value];
                    }},
                {label: '批准时间', name: 'okDate', index: 'OK_DATE', width: 80,
                    formatter: function (value) {
                        return transDate(value, "yyyy-MM-dd");
                    }},
                {label: 'id', name: 'id', index: 'ID', key: true, hidden: true},
            ]
        })
    })

    var vm = new Vue({
        el: '#rrapp',
        data: {
            showList: true,
            title: null,
            title_plan: '',
            devMaintenPlan: {

            },
            typeList:enumsToList('MAINTENPLAN_TYPE'),//类型
        }});
    getDatas = function () {
        var id = getSelectedRow("#jqGrid");
        if (id == null) {
            return;
        }else{
            return getSelectedRowData("#jqGrid");

        }
    }
</script>
</body>
</html>
